#include "tcpServer.hpp"
#include <iostream>

#include <memory>

void Usage(std::string proc)
{
    std::cout<<"\n\rUsage: "<<proc<<" prot[1024+]\n"<<std::endl;     //输出提示信息建议绑定1024以上端口号
}
int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(Usage_Err);
    }
    uint16_t port=std::stoi(argv[1]);
    std::unique_ptr<tcpServer> tcp_svr(new tcpServer(port));
    tcp_svr->Init();
    tcp_svr->Start();
}